#include "GBMors.h"
#include "reg52.h" 

sbit led = P2^1;
void SeriesInit(){
	TMOD |= 0x20;
	TH1 = 0xF3;
	TL1 = 0xF3;
	PCON = 0x80;
	TR1 = 1;
	SCON = 0x50;
	ES = 1;
	EA = 1;
}

void Series() interrupt 4{
	
	u8 reciveData;
	reciveData = SBUF;
	RI=0;
	//SBUF = reciveData;
	led = ~led;
	while(!TI);
	TI = 0;
}

void seriesSend(unsigned char dat){
	SBUF = dat;
	led = ~led;
	if(TI)
	TI = 0;
}